<crm-main-nav  nav-c="client" page-title="录入单个商机"></crm-main-nav>
<!-- 面包屑 -->
<div class="container">
  <ol class="breadcrumb">
      <li>CRM系统</li>
      <li>录入客户</li>
      <li class="active">录入单个</li>
  </ol>
</div>
<crm-panel title="客户联系方式">
	<div ng-controller="clientClientController">
		<form class="form-horizontal" name="client_form" ng-submit="clientForm(client_form.$valid,'/Main/main')" novalidate>
			<div class="form-group" id="base_info">
				<label class="col-sm-1 control-label">*姓名：</label>
				<div class="col-sm-2" ng-class="{'has-error':!client_form.name.$valid && (!client_form.$pristine || client_form.$submitted)}">
					<input type="text" name="name" ng-model="formData.name" ng-pattern="/^[\u4e00-\u9fa5a-zA-Z]{2,}$/" class="form-control" required>
				</div>
				<label class="col-sm-1 control-label">手机：</label>
				<div class="col-sm-2" ng-class="{'has-error':!client_form.phone.$valid && (!client_form.$pristine || client_form.$submitted)}">
					<input type="text" name="phone" ng-model="formData.phone" ng-pattern="/^1(3|4|5|7|8)\d{9}$/" class="form-control" required>
				</div>
				<label class="col-sm-1 control-label">QQ：</label>
				<div class="col-sm-2" ng-class="{'has-error':!client_form.qq.$valid && (!client_form.$pristine || client_form.$submitted)}">
					<input type="text" name="qq" ng-model="formData.qq" ng-minlength="5" class="form-control">
				</div>
				<label class="col-sm-1 control-label">Email：</label>
				<div class="col-sm-2" ng-class="{'has-error':!client_form.email.$valid && (!client_form.$pristine || client_form.$submitted)}">
					<input type="email" name="email" ng-model="formData.email" class="form-control">
				</div>
			</div>
			<div class="alert alert-warning" role="alert">* 提示：输入客户联系方式后，系统将自动检测该客户是否已存在，并同时检测该客户是否处于被保护状态.检测通过后才能添加商机</div>
			<div class="form-group">
				<div class="col-sm-offset-1 col-sm-10">
					<button class="btn btn-primary" id="add_business_btn" ng-if="moreInfo==false">添加商机及客户</button>
				</div>
			</div>
			<div class="more-info" ng-if="moreInfo">
				<ng-include src="'partials/layout/business_data_form.html'" ></ng-include>
				<div class="submit-box">
					<button type="submit" class="btn btn-primary">添加商机及客户</button>
				</div>
			</div>
		</form>
	</div>
</crm-panel>
